/*    */ package com.zimbra.cs.redolog.op;
/*    */ 
/*    */ import com.zimbra.cs.mailbox.MailboxOperation;
/*    */ import com.zimbra.cs.redolog.RedoLogInput;
/*    */ import com.zimbra.cs.redolog.RedoLogOutput;
/*    */ import com.zimbra.cs.volume.VolumeManager;
/*    */ import java.io.IOException;
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ public class SetCurrentVolume
/*    */   extends RedoableOp
/*    */ {
/*    */   private short mType;
/*    */   private short mId;
/*    */   
/*    */   public SetCurrentVolume()
/*    */   {
/* 33 */     super(MailboxOperation.SetCurrentVolume);
/*    */   }
/*    */   
/*    */   public SetCurrentVolume(short type, short id) {
/* 37 */     this();
/* 38 */     this.mType = type;
/* 39 */     this.mId = id;
/*    */   }
/*    */   
/*    */   protected String getPrintableData()
/*    */   {
/* 44 */     StringBuilder sb = new StringBuilder("type=").append(this.mType);
/* 45 */     sb.append(", id=").append(this.mId);
/* 46 */     return sb.toString();
/*    */   }
/*    */   
/*    */   protected void serializeData(RedoLogOutput out) throws IOException
/*    */   {
/* 51 */     out.writeShort(this.mType);
/* 52 */     out.writeShort(this.mId);
/*    */   }
/*    */   
/*    */   protected void deserializeData(RedoLogInput in) throws IOException
/*    */   {
/* 57 */     this.mType = in.readShort();
/* 58 */     this.mId = in.readShort();
/*    */   }
/*    */   
/*    */   public void redo() throws Exception
/*    */   {
/* 63 */     VolumeManager.getInstance().setCurrentVolume(this.mType, this.mId, getUnloggedReplay());
/*    */   }
/*    */ }


/* Location:              /home/mint/zimbrastore.jar!/com/zimbra/cs/redolog/op/SetCurrentVolume.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       0.7.1
 */